import request from '@/utils/request'

// 查询看板列配置列表
export function listColumn(query) {
  return request({
    url: '/order/column/list',
    method: 'get',
    params: query
  })
}

// 查询看板列配置详细
export function getColumn(id) {
  return request({
    url: '/order/column/' + id,
    method: 'get'
  })
}

// 查看看板id
export function getColumnByKanbanId(id) {
  return request({
    url: '/order/column/kanban/' + id,
    method: 'get'
  })
}

// 新增看板列配置
export function addColumn(data) {
  return request({
    url: '/order/column',
    method: 'post',
    data: data
  })
}

export function saveColumnSetting(data) {
  return request({
    url: '/order/column/setting',
    method: 'put',
    data: data
  })
}

// 修改看板列
export function updateColumn(data) {
  return request({
    url: '/order/column',
    method: 'put',
    data: data
  })
}

// 删除看板列配置
export function delColumn(id) {
  return request({
    url: '/order/column/' + id,
    method: 'delete'
  })
}

// 导出看板列配置
export function exportColumn(query) {
  return request({
    url: '/order/column/export',
    method: 'get',
    params: query
  })
}
